package com.coolgor.axnut.dao.auth;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.coolgor.axnut.entity.auth.Role;

public interface RoleDao {

	Role queryRoleById(Long roleID);
	
	List<Role> queryRoleTreeByParentID(@Param("parentID") Long parentID);

	List<Role> queryRoleListByParentIDs(@Param("parentIDs") List<Long> parentIDs);
	
	List<Role> queryRoleListByUserID(@Param("userID") Long userID);

	List<Role> queryRoleList(@Param("roleCondition") Role roleCondition,
										@Param("rowIndex") int rowIndex,
										@Param("pageSize") int pageSize);
	
	int queryRoleCount(@Param("roleCondition") Role roleCondition);
	
	int insert(Role role);
	
	int update(Role role);
	
	int delete(Role role);
	
	int deleteBatch(List<Long> roleIDList);
	
}